<%@page language="java" import="java.sql.Statement,java.sql.ResultSet"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>查看会员信息</title>
<link rel="stylesheet" href="css/wzys.css" />
</head>
<body>
	<%@ include file="../conn.jsp"%>
	<%	
	if((String)session.getAttribute("admin")==null){  //防止非管理员未经登录而直接使用
		out.print("<script>alert('管理员登录后方可使用本功能！');location.href='index.jsp'</script>");
	}
	String sql="select * from user";
	Statement st=conn.createStatement();
	ResultSet rs =st.executeQuery(sql);  //选择查询，无通配符时使用空对象数组
 %>

	<table border="1" width="500">
		<caption>
			<span class="title">会员信息显示及会员删除管理</span>
		</caption>
		<div>
		请输入查询条件：<input type="text" name="lname" /> <input type="submit" name="locate"/>
		</div>
		
		<tr>
			<th>会员名称</th>
			<th>会员密码</th>
			<th>会员真名</th>
			<th>手机号</th>
			<th>年龄</th>
		</tr>
		<% while(rs.next()){%>
		<tr>
			<td><%=rs.getString("username") %></td>
			<td><%=rs.getString("password") %></td>
			<td><%=rs.getString("realname") %></td>
			<td><%=rs.getString("mobile") %></td>
			<td><%=rs.getString("age") %></td>
		</tr>
		<% } %>
	</table>

</body>
</html>